package com.vogue.supplymall.account.domain.service.impl;


import java.util.HashMap;
import java.util.Map;

import org.springframework.stereotype.Service;
import com.vogue.ssm.database.dao.BaseDao;
import com.vogue.supplymall.account.domain.dao.RelUserCodeDao;
import com.vogue.supplymall.account.domain.model.RelUserCode;
import com.vogue.supplymall.account.domain.service.RelUserCodeService;

@Service("relUserCodeService")
public class RelUserCodeServiceImpl extends BaseServiceImpl<RelUserCode, Long> implements RelUserCodeService{

	private RelUserCodeDao relUserCodeDao;
	
	public RelUserCodeServiceImpl(BaseDao<RelUserCode, Long> baseDao) {
        super(baseDao);
        relUserCodeDao=(RelUserCodeDao)baseDao;
	}

	@Override
	public void delRelUserCode(Long userId, Long syscodeId) throws Exception {
		Map<String, Object> map=new HashMap<>();
		
		map.put("userId", userId);
		map.put("syscodeId", syscodeId);
		String sql="delete from rel_user_code where userId=#{userId}"
					+" and syscodeid=#{syscodeId}";
		
		relUserCodeDao.delete0(sql, map);
	}
	
}
